Intro to Entity-Relationship Model

This lesson introduces the concept of entity-relationship model.

The entity-relationship data model#

The entity-relationship (ER) data model is a high-level conceptual data model that has existed for over 35 years. It is well suited to data modeling for use with databases because it is fairly abstract and is easy to discuss and explain. ER models, also called ER schemas, are represented by ER diagrams.

ER modeling is based on two concepts:

  • Entities, defined as tables that hold specific information (data).

  • Relationships, defined as the associations or interactions between entities.

Here is an example of how these two concepts might be combined in an ER data model: Prof. Lawrence (entity) teaches (relationship) the database systems course (entity).

svg viewer

Example: a company database#

For the rest of this chapter, we will use a sample database called the COMPANY database to illustrate the concepts of the ER model. This database contains information about employees, departments, and projects. Important points to note include:

  • There are several departments in the company. Each department has a unique identification number, a name, location of the office and a particular employee who manages the department.
  • A department controls several projects, each of which has a unique name, a unique number, and a budget.
  • Each employee has a name, identification number, address, salary, and birthdate. An employee is assigned to one department but can work on several projects. We need to record the start date of the employee in each project. We also need to know the direct supervisor of each employee.
  • We want to keep track of the dependents for each employee. Each dependent has a name, birth date and relationship with the employee.
svg viewer
An ER diagram of a company database

The above figure shows how the schema for this database application can be displayed employing the ER diagram. This figure will be explained gradually as the ER model concepts are presented in the next few lessons so don’t worry about it too much.


In the next lesson, we will look at one of the basic components of an ER diagram: entities.

Quiz!
Entities, Entity Sets and Entity Types
Mark as Completed
Report an Issue